<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#000"><meta name="generator" content="Hexo 7.3.0">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#000">

<link rel="stylesheet" href="/css/main.css">



<link rel="stylesheet" href="https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha256-DfWjNxDkM94fVBWx1H5BMMp0Zq7luBlV8QRcSES7s+0=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/animate.css/3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/pace/1.2.4/themes/blue/pace-theme-minimal.css">
  <script src="https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/pace/1.2.4/pace.min.js" integrity="sha256-gqd7YTjg/BtfqWSwsJOvndl0Bxc8gFImLEkXQT8+qj0=" crossorigin="anonymous"></script>

<script class="next-config" data-name="main" type="application/json">{"hostname":"lm379.cn","root":"/","images":"/images","scheme":"Muse","darkmode":false,"version":"8.12.2","exturl":false,"sidebar":{"position":"right","display":"post","padding":18,"offset":12},"copycode":{"enable":true,"style":"mac"},"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"},"path":"/search.xml","localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":true}}</script><script src="https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/hexo-theme-next/8.12.2/config.min.js"></script>

    <meta name="description" content="AList美化简单教程">
<meta property="og:type" content="article">
<meta property="og:title" content="Alist 美化合集">
<meta property="og:url" content="https://lm379.cn/2024/07/08/Alist-%E7%BE%8E%E5%8C%96%E5%90%88%E9%9B%86/index.html">
<meta property="og:site_name" content="lm379のBlog">
<meta property="og:description" content="AList美化简单教程">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2024-07-08T12:59:07.000Z">
<meta property="article:modified_time" content="2025-03-16T15:33:31.000Z">
<meta property="article:author" content="lm379">
<meta property="article:tag" content="Alist">
<meta property="article:tag" content="美化">
<meta name="twitter:card" content="summary">


<link rel="canonical" href="https://lm379.cn/2024/07/08/Alist-%E7%BE%8E%E5%8C%96%E5%90%88%E9%9B%86/">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-CN","comments":true,"permalink":"https://lm379.cn/2024/07/08/Alist-%E7%BE%8E%E5%8C%96%E5%90%88%E9%9B%86/","path":"2024/07/08/Alist-美化合集/","title":"Alist 美化合集"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>Alist 美化合集 | lm379のBlog</title>
  



  <script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{&quot;token&quot;: &quot;5a58651dc232489989204bf6775afe7a&quot;}'></script>


  <noscript>
    <link rel="stylesheet" href="/css/noscript.css">
  </noscript>
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">lm379のBlog</p>
      <i class="logo-line"></i>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a></li><li class="menu-item menu-item-tags"><a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签<span class="badge">44</span></a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类<span class="badge">11</span></a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档<span class="badge">58</span></a></li><li class="menu-item menu-item-commonweal"><a href="/404/" rel="section"><i class="fa fa-heartbeat fa-fw"></i>公益 404</a></li><li class="menu-item menu-item-about"><a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a></li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup"><div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off" maxlength="80"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close" role="button">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div class="search-result-container no-result">
  <div class="search-result-icon">
    <i class="fa fa-spinner fa-pulse fa-5x"></i>
  </div>
</div>

    </div>
  </div>

</div>
        
  
  <div class="toggle sidebar-toggle" role="button">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>

  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E8%87%AA%E5%AE%9A%E4%B9%89%E5%A4%B4%E9%83%A8"><span class="nav-number">1.</span> <span class="nav-text"> 自定义头部</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E8%87%AA%E5%AE%9A%E4%B9%89%E5%86%85%E5%AE%B9"><span class="nav-number">2.</span> <span class="nav-text"> 自定义内容</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%85%B6%E4%BB%96%E4%BC%98%E5%8C%96"><span class="nav-number">3.</span> <span class="nav-text"> 其他优化</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%BF%AE%E6%94%B9alist%E9%9D%99%E6%80%81%E8%B5%84%E6%BA%90cdn"><span class="nav-number">3.1.</span> <span class="nav-text"> 修改AList静态资源CDN</span></a></li></ol></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="lm379"
      src="https://r2.lm379.cn/2024/05/4e267962f6254f01166242c803cd488f.jpg">
  <p class="site-author-name" itemprop="name">lm379</p>
  <div class="site-description" itemprop="description">记录个人的折腾之旅</div>
</div>
<div class="site-state-wrap site-overview-item animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">58</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/categories/">
        <span class="site-state-item-count">11</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
          <a href="/tags/">
        <span class="site-state-item-count">44</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author site-overview-item animated">
      <span class="links-of-author-item">
        <a href="https://github.com/lm379" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;lm379" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="mailto:lm379@foxmail.com" title="E-Mail → mailto:lm379@foxmail.com" rel="noopener" target="_blank"><i class="fa fa-envelope fa-fw"></i>E-Mail</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://weibo.com/u/6997206595" title="Weibo → https:&#x2F;&#x2F;weibo.com&#x2F;u&#x2F;6997206595" rel="noopener" target="_blank"><i class="fab fa-weibo fa-fw"></i>Weibo</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://space.bilibili.com/299502822" title="B站 → https:&#x2F;&#x2F;space.bilibili.com&#x2F;299502822" rel="noopener" target="_blank"><i class="fa bilibili fa-fw"></i>B站</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://www.zhihu.com/people/lm379" title="知乎 → https:&#x2F;&#x2F;www.zhihu.com&#x2F;people&#x2F;lm379" rel="noopener" target="_blank"><i class="fa zhihu fa-fw"></i>知乎</a>
      </span>
      <span class="links-of-author-item">
        <a href="http://www.coolapk.com/u/3126124" title="酷安 → http:&#x2F;&#x2F;www.coolapk.com&#x2F;u&#x2F;3126124" rel="noopener" target="_blank"><i class="fa coolapk fa-fw"></i>酷安</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://www.xiaohongshu.com/user/profile/6306019b0000000012001f11" title="小红书 → https:&#x2F;&#x2F;www.xiaohongshu.com&#x2F;user&#x2F;profile&#x2F;6306019b0000000012001f11" rel="noopener" target="_blank"><i class="fa xiaohongshu fa-fw"></i>小红书</a>
      </span>
  </div>


  <div class="links-of-blogroll site-overview-item animated">
    <div class="links-of-blogroll-title"><i class="fa fa-globe fa-fw"></i>
      Links
    </div>
    <ul class="links-of-blogroll-list">
        <li class="links-of-blogroll-item">
          <a href="https://pan.lm379.cn/" title="https:&#x2F;&#x2F;pan.lm379.cn" rel="noopener" target="_blank">OpenList</a>
        </li>
    </ul>
  </div>

        </div>
      </div>
        <div class="back-to-top animated" role="button" aria-label="返回顶部">
          <i class="fa fa-arrow-up"></i>
          <span>0%</span>
        </div>
    </div>
  </aside>
  <div class="sidebar-dimmer"></div>


    </header>

    
  <div class="reading-progress-bar"></div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://lm379.cn/2024/07/08/Alist-%E7%BE%8E%E5%8C%96%E5%90%88%E9%9B%86/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="https://r2.lm379.cn/2024/05/4e267962f6254f01166242c803cd488f.jpg">
      <meta itemprop="name" content="lm379">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="lm379のBlog">
      <meta itemprop="description" content="记录个人的折腾之旅">
    </span>

    <span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
      <meta itemprop="name" content="Alist 美化合集 | lm379のBlog">
      <meta itemprop="description" content="AList美化简单教程">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          Alist 美化合集
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2024-07-08 20:59:07" itemprop="dateCreated datePublished" datetime="2024-07-08T20:59:07+08:00">2024-07-08</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar-check"></i>
      </span>
      <span class="post-meta-item-text">更新于</span>
      <time title="修改时间：2025-03-16 23:33:31" itemprop="dateModified" datetime="2025-03-16T23:33:31+08:00">2025-03-16</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/AList%E7%B3%BB%E5%88%97%E6%95%99%E7%A8%8B/" itemprop="url" rel="index"><span itemprop="name">AList系列教程</span></a>
        </span>
    </span>

  
    <span class="post-meta-item" title="阅读次数" id="busuanzi_container_page_pv">
      <span class="post-meta-item-icon">
        <i class="far fa-eye"></i>
      </span>
      <span class="post-meta-item-text">阅读次数：</span>
      <span id="busuanzi_value_page_pv"></span>
    </span>
</div>

            <div class="post-description">AList美化简单教程</div>
        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
        
<div class="callout" data-callout="note">
<div class="callout-title">
<div class="callout-title-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-pencil"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"/><path d="m15 5 4 4"/></svg>
</div>
<div class="callout-title-inner">请自行修改下面的代码</div>
</div>
<div class="callout-content"><p>下面的图片部分请使用自己的图床，本文中原有链接将开启防盗链</p>
<blockquote>
<p>比如<a target="_blank" rel="noopener" href="https://picui.cn/">PICUI - PICUI图床</a> <a target="_blank" rel="noopener" href="https://www.superbed.cn/">聚合图床 - 免费无限图片上传</a><br />
或者使用对象存储自建图床，比如使用Cloudflare R2，可以参考我在知乎写的 <a target="_blank" rel="noopener" href="https://www.zhihu.com/question/564180731/answer/3561941977">Typora+PicGo 搭建博客图床的步骤是什么？ - 知乎</a><br />
如果需要配置国内CDN加速，可以参考<a  href="/2024/04/12/使用腾讯云CDN加速Cloudflare-R2/">使用腾讯云CDN加速Cloudflare-R2</a></p>
</blockquote>
</div></div><h2 id="自定义头部"><a class="markdownIt-Anchor" href="#自定义头部"></a> 自定义头部</h2>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br></pre></td><td class="code"><pre><span class="line">/* 显示站点运行时间的代码，请自行修改建站日期 */</span><br><span class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">	<span class="keyword">function</span> <span class="title function_">updateRuntime</span>(<span class="params"></span>) &#123;</span></span><br><span class="line"><span class="language-javascript">	    <span class="keyword">const</span> startDate = <span class="keyword">new</span> <span class="title class_">Date</span>(<span class="string">&#x27;2021-11-14T00:00:00&#x27;</span>); <span class="comment">// 建站日期</span></span></span><br><span class="line"><span class="language-javascript">	    <span class="keyword">const</span> now = <span class="keyword">new</span> <span class="title class_">Date</span>();</span></span><br><span class="line"><span class="language-javascript">	    <span class="keyword">const</span> elapsed = now - startDate;</span></span><br><span class="line"><span class="language-javascript">	</span></span><br><span class="line"><span class="language-javascript">	    <span class="keyword">const</span> days = <span class="title class_">Math</span>.<span class="title function_">floor</span>(elapsed / (<span class="number">1000</span> * <span class="number">60</span> * <span class="number">60</span> * <span class="number">24</span>));</span></span><br><span class="line"><span class="language-javascript">	    <span class="keyword">const</span> hours = <span class="title class_">Math</span>.<span class="title function_">floor</span>((elapsed % (<span class="number">1000</span> * <span class="number">60</span> * <span class="number">60</span> * <span class="number">24</span>)) / (<span class="number">1000</span> * <span class="number">60</span> * <span class="number">60</span>));</span></span><br><span class="line"><span class="language-javascript">	    <span class="keyword">const</span> minutes = <span class="title class_">Math</span>.<span class="title function_">floor</span>((elapsed % (<span class="number">1000</span> * <span class="number">60</span> * <span class="number">60</span>)) / (<span class="number">1000</span> * <span class="number">60</span>));</span></span><br><span class="line"><span class="language-javascript">	    <span class="keyword">const</span> seconds = <span class="title class_">Math</span>.<span class="title function_">floor</span>((elapsed % (<span class="number">1000</span> * <span class="number">60</span>)) / <span class="number">1000</span>);</span></span><br><span class="line"><span class="language-javascript">	</span></span><br><span class="line"><span class="language-javascript">	    <span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&#x27;runtime&#x27;</span>).<span class="property">innerHTML</span> = <span class="string">`<span class="subst">$&#123;days&#125;</span>天 <span class="subst">$&#123;hours&#125;</span>小时 <span class="subst">$&#123;minutes&#125;</span>分 <span class="subst">$&#123;seconds&#125;</span>秒`</span>;</span></span><br><span class="line"><span class="language-javascript">	&#125;</span></span><br><span class="line"><span class="language-javascript">	</span></span><br><span class="line"><span class="language-javascript">	<span class="built_in">setInterval</span>(updateRuntime, <span class="number">1000</span>); <span class="comment">// 每秒更新一次时间</span></span></span><br><span class="line"><span class="language-javascript">	<span class="title function_">updateRuntime</span>(); <span class="comment">// 初始化时间显示</span></span></span><br><span class="line"><span class="language-javascript"></span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">link</span> <span class="attr">type</span>=<span class="string">&#x27;text/css&#x27;</span> <span class="attr">rel</span>=<span class="string">&quot;stylesheet&quot;</span> <span class="attr">href</span>=<span class="string">&quot;https://npm.elemecdn.com/font6pro@6.3.0/css/fontawesome.min.css&quot;</span> <span class="attr">media</span>=<span class="string">&#x27;all&#x27;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">link</span> <span class="attr">rel</span>=<span class="string">&quot;stylesheet&quot;</span> <span class="attr">href</span>=<span class="string">&quot;https://npm.elemecdn.com/lxgw-wenkai-webfont@1.1.0/lxgwwenkai-regular.css&quot;</span> /&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">link</span> <span class="attr">href</span>=<span class="string">&quot;https://npm.elemecdn.com/font6pro@6.3.0/css/all.min.css&quot;</span> <span class="attr">rel</span>=<span class="string">&quot;stylesheet&quot;</span>&gt;</span></span><br><span class="line">/* 获取访客ip */</span><br><span class="line"><span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;https://cdn.jsdmirror.cn/gh/lm379look/lm379look@main/getip.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;https://polyfill.alicdn.com/v3/polyfill.min.js?features=String.prototype.replaceAll&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span>  </span><br><span class="line"><span class="tag">&lt;<span class="name">style</span>&gt;</span><span class="language-css"></span></span><br><span class="line"><span class="language-css"><span class="comment">/*白天背景图*/</span></span></span><br><span class="line"><span class="language-css"> <span class="selector-class">.hope-ui-light</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-image</span>: <span class="built_in">url</span>(<span class="string">&quot;这里改成你的背景图链接&quot;</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-repeat</span>:no-repeat;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-size</span>:cover;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-attachment</span>:fixed;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-position-x</span>:center;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="comment">/*夜间背景图*/</span></span></span><br><span class="line"><span class="language-css"> <span class="selector-class">.hope-ui-dark</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-image</span>: <span class="built_in">url</span>(<span class="string">&quot;这里改成你的背景图链接&quot;</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-repeat</span>:no-repeat;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-size</span>:cover;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-attachment</span>:fixed;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-position-x</span>:center;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="comment">/*主列表白天模式透明*/</span></span></span><br><span class="line"><span class="language-css"> <span class="selector-class">.obj-box</span><span class="selector-class">.hope-stack</span><span class="selector-class">.hope-c-dhzjXW</span><span class="selector-class">.hope-c-PJLV</span><span class="selector-class">.hope-c-PJLV-igScBhH-css</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-color</span>: <span class="built_in">rgba</span>(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">0</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="comment">/*主列表夜间模式透明*/</span></span></span><br><span class="line"><span class="language-css"> <span class="selector-class">.obj-box</span><span class="selector-class">.hope-stack</span><span class="selector-class">.hope-c-dhzjXW</span><span class="selector-class">.hope-c-PJLV</span><span class="selector-class">.hope-c-PJLV-iigjoxS-css</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-color</span>:<span class="built_in">rgb</span>(<span class="number">0</span> <span class="number">0</span> <span class="number">0</span> / <span class="number">0%</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="comment">/*readme白天模式透明*/</span></span></span><br><span class="line"><span class="language-css"> <span class="selector-class">.hope-c-PJLV</span><span class="selector-class">.hope-c-PJLV-ikSuVsl-css</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-color</span>: <span class="built_in">rgba</span>(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">0.2</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="comment">/*readme夜间模式透明*/</span></span></span><br><span class="line"><span class="language-css"> <span class="selector-class">.hope-c-PJLV</span><span class="selector-class">.hope-c-PJLV-iiuDLME-css</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-color</span>:<span class="built_in">rgb</span>(<span class="number">0</span> <span class="number">0</span> <span class="number">0</span> / <span class="number">20%</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css"><span class="comment">/*顶部右上角切换按钮透明*/</span></span></span><br><span class="line"><span class="language-css"> <span class="selector-class">.hope-ui-light</span> <span class="selector-class">.hope-c-ivMHWx-hZistB-cv</span><span class="selector-class">.hope-icon-button</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-color</span>: <span class="built_in">rgba</span>(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">0</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="selector-class">.hope-ui-dark</span> <span class="selector-class">.hope-c-ivMHWx-hZistB-cv</span><span class="selector-class">.hope-icon-button</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-color</span>:<span class="built_in">rgb</span>(<span class="number">0</span> <span class="number">0</span> <span class="number">0</span> / <span class="number">0%</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="comment">/*右下角侧边栏按钮透明 第一个是白天 第二个是夜间*/</span></span></span><br><span class="line"><span class="language-css"> <span class="selector-class">.hope-ui-light</span> <span class="selector-class">.hope-c-PJLV-ijgzmFG-css</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-color</span>: <span class="built_in">rgba</span>(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">0</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="selector-class">.hope-ui-dark</span> <span class="selector-class">.hope-c-PJLV-ijgzmFG-css</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-color</span>:<span class="built_in">rgb</span>(<span class="number">0</span> <span class="number">0</span> <span class="number">0</span> / <span class="number">0%</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css"><span class="comment">/*白天模式代码块透明*/</span></span></span><br><span class="line"><span class="language-css"> <span class="selector-class">.hope-ui-light</span> pre &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-color</span>: <span class="built_in">rgba</span>(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">0.1</span>)<span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="comment">/*夜间模式代码块透明*/</span></span></span><br><span class="line"><span class="language-css"> <span class="selector-class">.hope-ui-dark</span> pre &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-color</span>: <span class="built_in">rgba</span>(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">0.1</span>)<span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css"><span class="comment">/*左侧侧边栏目录*/</span></span></span><br><span class="line"><span class="language-css"><span class="comment">/*白天模式*/</span></span></span><br><span class="line"><span class="language-css"> <span class="selector-class">.hope-ui-light</span> <span class="selector-class">.hope-c-PJLV-ieGWMbI-css</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background</span>: <span class="built_in">rgba</span>(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">0</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="comment">/*夜间模式*/</span></span></span><br><span class="line"><span class="language-css"> <span class="selector-class">.hope-ui-dark</span> <span class="selector-class">.hope-c-PJLV-ieGWMbI-css</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-color</span>:<span class="built_in">rgb</span>(<span class="number">0</span> <span class="number">0</span> <span class="number">0</span> / <span class="number">0%</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css"><span class="comment">/* 返回顶部 */</span></span></span><br><span class="line"><span class="language-css"> <span class="selector-class">.hope-c-PJLV-ihVEsOa-css</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background</span>: <span class="built_in">rgba</span>(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">0.5</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="selector-class">.hope-ui-dark</span> <span class="selector-class">.hope-c-PJLV-ihVEsOa-css</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-color</span>:<span class="built_in">rgb</span>(<span class="number">0</span> <span class="number">0</span> <span class="number">0</span> / <span class="number">50%</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css"><span class="comment">/*正常情况未使用吸附功能*/</span></span></span><br><span class="line"><span class="language-css"><span class="comment">/*顶部*/</span></span></span><br><span class="line"><span class="language-css"> <span class="selector-class">.hope-c-PJLV-ikaMhsQ-css</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background</span>: <span class="built_in">rgba</span>(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">0</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="comment">/*导航条*/</span> </span></span><br><span class="line"><span class="language-css"><span class="comment">/*白天模式*/</span></span></span><br><span class="line"><span class="language-css"> <span class="selector-class">.hope-ui-light</span> <span class="selector-class">.hope-c-PJLV-idaeksS-css</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-color</span>: <span class="built_in">rgba</span>(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">0</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">border-radius</span>: <span class="built_in">var</span>(--hope-radii-xl) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="comment">/*夜间模式*/</span></span></span><br><span class="line"><span class="language-css"> <span class="selector-class">.hope-ui-dark</span> <span class="selector-class">.hope-c-PJLV-idaeksS-css</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-color</span>:<span class="built_in">rgb</span>(<span class="number">0</span> <span class="number">0</span> <span class="number">0</span> / <span class="number">0%</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">border-radius</span>: <span class="built_in">var</span>(--hope-radii-xl) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="comment">/* 吸附到页面顶部 */</span></span></span><br><span class="line"><span class="language-css"><span class="comment">/*顶部*/</span></span></span><br><span class="line"><span class="language-css"> <span class="selector-class">.hope-c-PJLV-icWrYmg-css</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background</span>: <span class="built_in">rgba</span>(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">0</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="comment">/*导航条*/</span></span></span><br><span class="line"><span class="language-css"> <span class="selector-class">.hope-c-PJLV-icKsjdm-css</span><span class="selector-pseudo">::after</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background</span>: <span class="built_in">rgba</span>(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">0</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="comment">/*白天模式*/</span></span></span><br><span class="line"><span class="language-css"> <span class="selector-class">.hope-ui-light</span> <span class="selector-class">.hope-c-PJLV-icKsjdm-css</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-color</span>: <span class="built_in">rgba</span>(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">0</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">border-radius</span>: <span class="built_in">var</span>(--hope-radii-xl) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="comment">/*夜间模式*/</span></span></span><br><span class="line"><span class="language-css"> <span class="selector-class">.hope-ui-dark</span> <span class="selector-class">.hope-c-PJLV-icKsjdm-css</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-color</span>:<span class="built_in">rgb</span>(<span class="number">0</span> <span class="number">0</span> <span class="number">0</span> / <span class="number">0%</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">border-radius</span>: <span class="built_in">var</span>(--hope-radii-xl) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="comment">/*仅吸附导航栏*/</span></span></span><br><span class="line"><span class="language-css"><span class="comment">/*导航条*/</span></span></span><br><span class="line"><span class="language-css"> <span class="selector-class">.hope-c-PJLV-ifdXShc-css</span><span class="selector-pseudo">::after</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background</span>: <span class="built_in">rgba</span>(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">0</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="comment">/*白天模式*/</span></span></span><br><span class="line"><span class="language-css"> <span class="selector-class">.hope-ui-light</span> <span class="selector-class">.hope-c-hrsMRY</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-color</span>: <span class="built_in">rgba</span>(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">0.5</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">border-radius</span>: <span class="built_in">var</span>(--hope-radii-xl) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="comment">/*夜间模式*/</span></span></span><br><span class="line"><span class="language-css"> <span class="selector-class">.hope-ui-dark</span> <span class="selector-class">.hope-c-hrsMRY</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-color</span>:<span class="built_in">rgb</span>(<span class="number">0</span> <span class="number">0</span> <span class="number">0</span> / <span class="number">50%</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">border-radius</span>: <span class="built_in">var</span>(--hope-radii-xl) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="comment">/*路径栏透明*/</span></span></span><br><span class="line"><span class="language-css"><span class="selector-class">.hope-ui-dark</span> <span class="selector-class">.hope-c-PJLV-idaeksS-css</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-color</span>:<span class="built_in">rgb</span>(<span class="number">0</span> <span class="number">0</span> <span class="number">0</span> / <span class="number">0%</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="selector-class">.hope-ui-light</span> <span class="selector-class">.hope-c-PJLV-idaeksS-css</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-color</span>:<span class="built_in">rgb</span>(<span class="number">0</span> <span class="number">0</span> <span class="number">0</span> / <span class="number">0%</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="comment">/*markdown大纲透明*/</span></span></span><br><span class="line"><span class="language-css"><span class="selector-class">.hope-c-PJLV-igmvEDM-css</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">background-color</span>:<span class="built_in">rgb</span>(<span class="number">0</span> <span class="number">0</span> <span class="number">0</span> / <span class="number">0%</span>) <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="comment">/*修改全局字体为霞鹜文楷*/</span></span></span><br><span class="line"><span class="language-css"> * &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">font-family</span>:LXGW WenKai</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css">* &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">font-weight</span>:bold</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="selector-tag">body</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">font-family</span>: LXGW WenKai;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"></span><span class="tag">&lt;/<span class="name">style</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>上面修改了全局透明度，引入了一些js以及字体</p>
<p>你可以自己进行修改，比如修改全局字体为MiSans</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">link</span> <span class="attr">rel</span>=<span class="string">&quot;stylesheet&quot;</span> <span class="attr">href</span>=<span class="string">&quot;https://font.sec.miui.com/font/css?family=MiSans:400,700:MiSans&quot;</span> /&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">style</span>&gt;</span><span class="language-css"></span></span><br><span class="line"><span class="language-css">* &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">font-family</span>:MiSans</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"><span class="selector-tag">body</span> &#123;</span></span><br><span class="line"><span class="language-css">    <span class="attribute">font-family</span>:MiSans;</span></span><br><span class="line"><span class="language-css">&#125;</span></span><br><span class="line"><span class="language-css"></span><span class="tag">&lt;/<span class="name">style</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h2 id="自定义内容"><a class="markdownIt-Anchor" href="#自定义内容"></a> 自定义内容</h2>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!--延迟加载--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">&quot;customize&quot;</span> <span class="attr">style</span>=<span class="string">&quot;display: none;&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">center</span> <span class="attr">class</span>=<span class="string">&quot;dibu&quot;</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">div</span> <span class="attr">style</span>=<span class="string">&quot;font-size: 13px; font-weight: bold;&quot;</span>&gt;</span></span><br><span class="line">                <span class="comment">&lt;!--显示访客ip--&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">p</span> <span class="attr">style</span>=<span class="string">&quot;text-align: center&quot;</span> <span class="attr">id</span>=<span class="string">&quot;welcome&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line">                <span class="comment">&lt;!--显示站点运行时间--&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">p</span> <span class="attr">style</span>=<span class="string">&quot;text-align: center;&quot;</span>&gt;</span>本站已稳定运行<span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">&quot;runtime&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">span</span>&gt;</span><span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line">                <span class="comment">&lt;!--添加备案信息--&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">&quot;nav-item&quot;</span>&gt;</span></span><br><span class="line">                    <span class="tag">&lt;<span class="name">a</span> <span class="attr">class</span>=<span class="string">&quot;nav-link&quot;</span> <span class="attr">href</span>=<span class="string">&quot;https://beian.miit.gov.cn/#/Integrated/index&quot;</span> <span class="attr">target</span>=<span class="string">&quot;_blank&quot;</span>&gt;</span></span><br><span class="line">                        <span class="tag">&lt;<span class="name">i</span> <span class="attr">class</span>=<span class="string">&quot;fa-solid fa-shield-check&quot;</span> <span class="attr">style</span>=<span class="string">&quot;color:#409EFF;&quot;</span> <span class="attr">aria-hidden</span>=<span class="string">&quot;true&quot;</span>&gt;</span></span><br><span class="line">                        <span class="tag">&lt;/<span class="name">i</span>&gt;</span></span><br><span class="line">                        ICP备2022000000号</span><br><span class="line">                    <span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">p</span> <span class="attr">style</span>=<span class="string">&quot;text-align: center&quot;</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;https://ipw.cn/ipv6webcheck/?site=pan.lm379.cn&quot;</span></span></span><br><span class="line"><span class="tag">                        <span class="attr">title</span>=<span class="string">&quot;本站支持IPv6访问&quot;</span> <span class="attr">target</span>=<span class="string">&#x27;_blank&#x27;</span>&gt;</span><span class="tag">&lt;<span class="name">img</span> <span class="attr">style</span>=<span class="string">&#x27;display:inline-block;vertical-align:middle&#x27;</span></span></span><br><span class="line"><span class="tag">                            <span class="attr">alt</span>=<span class="string">&quot;本站支持IPv6访问&quot;</span> <span class="attr">src</span>=<span class="string">&quot;https://static.ipw.cn/icon/ipv6-s4.svg&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">                    <span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;https://ipw.cn/ssl/?site=pan.lm379.cn&quot;</span> <span class="attr">title</span>=<span class="string">&quot;本站支持SSL安全访问&quot;</span> <span class="attr">target</span>=<span class="string">&#x27;_blank&#x27;</span>&gt;</span><span class="tag">&lt;<span class="name">img</span></span></span><br><span class="line"><span class="tag">                            <span class="attr">style</span>=<span class="string">&#x27;display:inline-block;vertical-align:middle&#x27;</span> <span class="attr">alt</span>=<span class="string">&quot;本站支持SSL安全访问&quot;</span></span></span><br><span class="line"><span class="tag">                            <span class="attr">src</span>=<span class="string">&quot;https://static.ipw.cn/icon/ssl-s4.svg&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">center</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">    <span class="comment">&lt;!--延迟加载范围到这里结束--&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="comment">&lt;!--延迟加载配套使用JS--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">    <span class="keyword">let</span> interval = <span class="built_in">setInterval</span>(<span class="function">() =&gt;</span> &#123;</span></span><br><span class="line"><span class="language-javascript">        <span class="keyword">if</span> (<span class="variable language_">document</span>.<span class="title function_">querySelector</span>(<span class="string">&quot;.footer&quot;</span>)) &#123;</span></span><br><span class="line"><span class="language-javascript">            <span class="variable language_">document</span>.<span class="title function_">querySelector</span>(<span class="string">&quot;#customize&quot;</span>).<span class="property">style</span>.<span class="property">display</span> = <span class="string">&quot;&quot;</span>;</span></span><br><span class="line"><span class="language-javascript">            <span class="built_in">clearInterval</span>(interval);</span></span><br><span class="line"><span class="language-javascript">        &#125;</span></span><br><span class="line"><span class="language-javascript">    &#125;, <span class="number">200</span>);</span></span><br><span class="line"><span class="language-javascript"></span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>其中显示站点运行时间的js代码为</p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">function</span> <span class="title function_">updateRuntime</span>(<span class="params"></span>) &#123;</span><br><span class="line">    <span class="keyword">const</span> startDate = <span class="keyword">new</span> <span class="title class_">Date</span>(<span class="string">&#x27;2021-11-14T00:00:00&#x27;</span>); <span class="comment">// 建站日期</span></span><br><span class="line">    <span class="keyword">const</span> now = <span class="keyword">new</span> <span class="title class_">Date</span>();</span><br><span class="line">    <span class="keyword">const</span> elapsed = now - startDate;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">const</span> days = <span class="title class_">Math</span>.<span class="title function_">floor</span>(elapsed / (<span class="number">1000</span> * <span class="number">60</span> * <span class="number">60</span> * <span class="number">24</span>));</span><br><span class="line">    <span class="keyword">const</span> hours = <span class="title class_">Math</span>.<span class="title function_">floor</span>((elapsed % (<span class="number">1000</span> * <span class="number">60</span> * <span class="number">60</span> * <span class="number">24</span>)) / (<span class="number">1000</span> * <span class="number">60</span> * <span class="number">60</span>));</span><br><span class="line">    <span class="keyword">const</span> minutes = <span class="title class_">Math</span>.<span class="title function_">floor</span>((elapsed % (<span class="number">1000</span> * <span class="number">60</span> * <span class="number">60</span>)) / (<span class="number">1000</span> * <span class="number">60</span>));</span><br><span class="line">    <span class="keyword">const</span> seconds = <span class="title class_">Math</span>.<span class="title function_">floor</span>((elapsed % (<span class="number">1000</span> * <span class="number">60</span>)) / <span class="number">1000</span>);</span><br><span class="line"></span><br><span class="line">    <span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&#x27;runtime&#x27;</span>).<span class="property">innerHTML</span> = <span class="string">`<span class="subst">$&#123;days&#125;</span>天 <span class="subst">$&#123;hours&#125;</span>小时 <span class="subst">$&#123;minutes&#125;</span>分 <span class="subst">$&#123;seconds&#125;</span>秒`</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="built_in">setInterval</span>(updateRuntime, <span class="number">1000</span>); <span class="comment">// 每秒更新一次时间</span></span><br><span class="line"><span class="title function_">updateRuntime</span>(); <span class="comment">// 初始化时间显示</span></span><br></pre></td></tr></table></figure>
<p>获取访客ip的js代码为</p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line"><span class="title function_">fetch</span>(<span class="string">&#x27;https://api.vore.top/api/IPdata&#x27;</span>)</span><br><span class="line">    .<span class="title function_">then</span>(<span class="function"><span class="params">response</span> =&gt;</span> response.<span class="title function_">json</span>())</span><br><span class="line">    .<span class="title function_">then</span>(<span class="function"><span class="params">data</span> =&gt;</span> &#123;</span><br><span class="line">        <span class="keyword">const</span> ip = data.<span class="property">ipinfo</span>.<span class="property">text</span>;</span><br><span class="line">        <span class="keyword">const</span> province = data.<span class="property">ipdata</span>.<span class="property">info1</span>;</span><br><span class="line">        <span class="keyword">const</span> city = data.<span class="property">ipdata</span>.<span class="property">info2</span>;</span><br><span class="line">        <span class="keyword">const</span> isp = data.<span class="property">ipdata</span>.<span class="property">isp</span>;</span><br><span class="line">        <span class="keyword">const</span> area_code = data.<span class="property">ipinfo</span>.<span class="property">cnip</span>;</span><br><span class="line">        <span class="keyword">const</span> nation = data.<span class="property">ipdata</span>.<span class="property">info1</span>;</span><br><span class="line">        <span class="keyword">let</span> welcomeMessage;</span><br><span class="line">        <span class="keyword">if</span> (area_code) &#123;</span><br><span class="line">            welcomeMessage = <span class="string">`欢迎<span class="subst">$&#123;province&#125;</span><span class="subst">$&#123;city&#125;</span><span class="subst">$&#123;isp&#125;</span> (IP: <span class="subst">$&#123;ip&#125;</span>) 的小伙伴访问本站`</span>;</span><br><span class="line">        &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">            welcomeMessage = <span class="string">`欢迎<span class="subst">$&#123;nation&#125;</span><span class="subst">$&#123;isp&#125;</span> (IP: <span class="subst">$&#123;ip&#125;</span>) 的小伙伴访问本站`</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&#x27;welcome&#x27;</span>).<span class="property">textContent</span> = welcomeMessage;</span><br><span class="line">    &#125;)</span><br><span class="line">    .<span class="title function_">catch</span>(<span class="function"><span class="params">error</span> =&gt;</span> <span class="variable language_">console</span>.<span class="title function_">error</span>(error));</span><br></pre></td></tr></table></figure>
<p>在我的配置中已经将这两个js传到了github然后通过jsdelivr引用(使用了jsd镜像)，你也可以直接使用<code>&lt;script&gt;</code>标签引用上面的代码</p>
<p>我将引用的部分放在了自定义头部</p>
<h2 id="其他优化"><a class="markdownIt-Anchor" href="#其他优化"></a> 其他优化</h2>
<h3 id="修改alist静态资源cdn"><a class="markdownIt-Anchor" href="#修改alist静态资源cdn"></a> 修改AList静态资源CDN</h3>
<p>以脚本直接安装为例</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nano /opt/alist/data/config.json</span><br></pre></td></tr></table></figure>
<p>修改CDN字段如下</p>
<figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">&quot;cdn&quot;</span><span class="punctuation">:</span> <span class="string">&quot;https://registry.npmmirror.com/alist-web/$version/files/dist/&quot;</span></span><br></pre></td></tr></table></figure>
<p>然后重启AList使配置生效</p>
<p>若使用Alist默认的logo，建议进入AList后台将网站图标修改为</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">https://cdn.jsdmirror.cn/gh/alist-org/logo@main/logo.svg</span><br></pre></td></tr></table></figure>
<p>修改音频封面为</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">https://cdn.jsdmirror.cn/gh/alist-org/logo@main/logo.svg</span><br></pre></td></tr></table></figure>

    </div>

    
    
    

    <footer class="post-footer">
          <div class="reward-container">
  <div>打赏</div>
  <button>
    赞赏
  </button>
  <div class="post-reward">
      <div>
        <img src="https://r2.lm379.cn/2024/04/f597f96be857f5d530a787c8b81731da.jpg" alt="lm379 支付宝">
        <span>支付宝</span>
      </div>

  </div>
</div>

          <div class="post-tags">
              <a href="/tags/Alist/" rel="tag"><i class="fa fa-tag"></i> Alist</a>
              <a href="/tags/%E7%BE%8E%E5%8C%96/" rel="tag"><i class="fa fa-tag"></i> 美化</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/2024/06/14/%E9%83%A8%E5%88%86%E5%85%AC%E5%85%B1%E6%9C%8D%E5%8A%A1%E9%95%9C%E5%83%8F/" rel="prev" title="整理下一些公共服务镜像">
                  <i class="fa fa-chevron-left"></i> 整理下一些公共服务镜像
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/2024/07/09/Alist-%E5%88%AB%E5%90%8D%E5%8A%9F%E8%83%BD%E4%BB%8B%E7%BB%8D/" rel="next" title="Alist 别名功能介绍">
                  Alist 别名功能介绍 <i class="fa fa-chevron-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






    
  
  <div class="comments giscus-container">
  </div>
  
  
</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">

  <div class="beian"><a href="https://beian.miit.gov.cn/" rel="noopener" target="_blank">蜀ICP备2022016740号-1 </a>
  </div>

<div class="copyright">
  &copy; 2022 – 
  <span itemprop="copyrightYear">2025</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">lm379. All Rights Reserved.</span>
</div>
<div class="busuanzi-count">
    <span class="post-meta-item" id="busuanzi_container_site_uv">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-item" id="busuanzi_container_site_pv">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>

    </div>
  </footer>

  
  <script src="https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/animejs/3.2.1/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
<script src="https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/hexo-theme-next/8.12.2/comments.min.js"></script><script src="https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/hexo-theme-next/8.12.2/utils.min.js"></script><script src="https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/hexo-theme-next/8.12.2/motion.min.js"></script><script src="https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/hexo-theme-next/8.12.2/schemes/muse.min.js"></script><script src="https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/hexo-theme-next/8.12.2/next-boot.min.js"></script>

  
<script src="https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/hexo-generator-searchdb/1.4.0/search.js" integrity="sha256-vXZMYLEqsROAXkEw93GGIvaB2ab+QW6w3+1ahD9nXXA=" crossorigin="anonymous"></script>
<script src="https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/hexo-theme-next/8.12.2/third-party/search/local-search.min.js"></script>




  <script src="https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/hexo-theme-next/8.12.2/third-party/pace.min.js"></script>

  
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>




  

  <script class="next-config" data-name="enableMath" type="application/json">true</script><link rel="stylesheet" href="https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/KaTeX/0.16.0/katex.min.css" integrity="sha256-uik/hNqHWZldXh/0K35nqOSCff9F61/ZOFReqNOBgB0=" crossorigin="anonymous">
  <script class="next-config" data-name="katex" type="application/json">{"copy_tex_js":{"url":"https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/KaTeX/0.16.0/contrib/copy-tex.min.js","integrity":"sha256-Us54+rSGDSTvIhKKUs4kygE2ipA0RXpWWh0/zLqw3bs="}}</script>
  <script src="https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/hexo-theme-next/8.12.2/third-party/math/katex.min.js"></script>


<script class="next-config" data-name="giscus" type="application/json">{"enable":true,"repo":"lm379/lm379.github.io","repo_id":"R_kgDOHoD2KA","category":"Announcements","category_id":"DIC_kwDOHoD2KM4CgEIm","mapping":"title","strict":0,"reactions_enabled":1,"emit_metadata":0,"theme":"light_tritanopia","lang":"zh-CN","crossorigin":"anonymous","input_position":"top","loading":"lazy"}</script>

<script>
document.addEventListener('page:loaded', () => {
  if (!CONFIG.page.comments) return;

  NexT.utils.loadComments('.giscus-container')
    .then(() => NexT.utils.getScript('https://giscus.app/client.js', {
      attributes: {
        async                   : true,
        crossOrigin             : 'anonymous',
        'data-repo'             : CONFIG.giscus.repo,
        'data-repo-id'          : CONFIG.giscus.repo_id,
        'data-category'         : CONFIG.giscus.category,
        'data-category-id'      : CONFIG.giscus.category_id,
        'data-mapping'          : CONFIG.giscus.mapping,
        'data-strict'           : CONFIG.giscus.strict,
        'data-reactions-enabled': CONFIG.giscus.reactions_enabled,
        'data-emit-metadata'    : CONFIG.giscus.emit_metadata,
        'data-theme'            : CONFIG.giscus.theme,
        'data-lang'             : CONFIG.giscus.lang,
        'data-input-position'   : CONFIG.giscus.input_position,
        'data-loading'          : CONFIG.giscus.loading
      },
      parentNode: document.querySelector('.giscus-container')
    }));
});
</script>


  <link rel="stylesheet" href="/dist/APlayer.min.css">
  <div id="aplayer"></div>
  <script type="text/javascript" src="/dist/APlayer.min.js"></script>
  <script type="text/javascript" src="/dist/music.js"></script>  

  <script type="text/javascript" src="\js\FunnyTitle.js"></script>

</body>
</html>
